package org.ycy.data.generator.core;

import lombok.extern.slf4j.Slf4j;
import org.ycy.data.generator.generator.IGenerator;

/**
 * 列值线程生成器
 */
@Slf4j
public class ColumnValueThread implements Runnable {

    private Long lineSize;

    private IGenerator iGenerator;

    public ColumnValueThread(Long lineSize, IGenerator iGenerator) {
        this.lineSize = lineSize;
        this.iGenerator = iGenerator;
    }

    @Override
    public void run() {

        long times = 0;

        while (times < lineSize) {
            Object value = iGenerator.generator();
            times++;
        }

    }
}
